home *** CD-ROM | disk | FTP | other *** search
/ 100 Great Games for Windows ME / 100 Great Games Windows ME.iso / top100.dxr / 00010_Script_UI Rollover Change Pointer < prev    next >
Text File  |  2000-11-06  |  2KB  |  47 lines

  1. -- Pointer Change on Rollover
  2.  
  3.  
  4. -- behavior library version 1.1
  5. -- a control
  6. -- Changes the cursor when the cursor rollsover the sprite
  7.  
  8. property outcurs, incurs, incursSet, customImage, customMask, oldcursor
  9. property useCustom
  10.  
  11.  
  12. on translate_cursor me, setting, image, mask, custom
  13.   if custom then
  14.     set val = [ member image, member mask ]
  15.     return val
  16.   end if
  17.   return setting
  18. end
  19.  
  20.  
  21. --- 
  22.  
  23. on beginSprite me
  24.   set oldcursor = the cursor of sprite the spritenum of me
  25.   set val =  translate_cursor( me, the incursSet of me,customImage,customMask,useCustom )
  26.   set the cursor of sprite the spriteNum of me = val
  27.   
  28. end
  29.  
  30. on endsprite me
  31.   set the cursor of sprite the spriteNum of me = oldcursor
  32. end
  33.  
  34. on getPropertyDescriptionList
  35.   
  36.   set p_list = [      #incursSet: [ #comment:   "Pointer Image:",                     #format:   #cursor,                    #default:   1],        #useCustom: [ #comment: "Use Custom Pointer:",                     #format:   #boolean,                    #default:    FALSE ],   #customImage: [ #comment:   "Custom Image:",                     #format:   #bitmap,                    #default:    member 1 ],     #customMask: [ #comment:   "Custom Mask:",                     #format:   #bitmap,                    #default:    member 1 ]                  ]
  37.   return p_list 
  38.   
  39. end
  40.  
  41.  
  42. on getBehaviorDescription
  43.   return "Changes the pointer image when the pointer rolls over the current sprite. Choose one of the pointers included with Director, or specify a 1-bit bitmapped cast member." & RETURN & "PARAMETERS:" & RETURN & "ò Pointer Image - Choose one of Director's included pointers."  & RETURN & "ò Use Custom Pointer - Turn this option on to specify a cast member instead of an included pointer."  & RETURN & "ò Custom Image  - ( optional ) Choose a cast member to use as the pointer image.  This choice is ignored unless Use Custom Pointer is on."  & RETURN & "ò Custom Mask - ( optional ) Choose a cast member to use as mask image."
  44.   
  45. end
  46.  
  47.